/*
 * @Date: 2023-12-26 13:18:59
 * @LastEditors: lyx
 * @LastEditTime: 2023-12-26 14:30:00
 * @FilePath: \taro-template3\src\api\auth.ts
 * @Description:
 */
/**
 * 权限登陆认证

 */
import { request } from "@/lib/request";

/**
 * 登陆
 * 退出登录
 */
export const ApiUserLoginLogOut = (data) => {
  return request({
    url: "/post/logOut",
    method: "POST",
    data,
  });
};

/*
 * 获取用户信息
 * @param {}
 * @return
 */
export const ApiGetUserInfo = (data) => {
  // return request({
  //   url: "/post/getUserInfo",
  //   method: "POST",
  //   data,
  // });
  return new Promise((resolve, reject) => {
    resolve({
      code: "00000",
      content: {
        email: "1234567892@qq.com",
        headImg:
          "https://img12.360buyimg.com/imagetools/jfs/t1/143702/31/16654/116794/5fc6f541Edebf8a57/4138097748889987.png",
        nickName: "Lawlighty",
        username: "13616859570",
        token:
          "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySW5mbyI6IntcInVzZXJcIjp7XCJpZFwiOjI5MjUxLFwidXNlcm5hbWVcIjpcImFkbWluXzEwMjVcIixcIm5pY2tOYW1lXCI6XCJhZG1pbl8xMDI1XCIsXCJ0eXBlXCI6MSxcImNsaWVudElkXCI6XCJhZG1pbi1hcHBcIn0sXCJwYXJlbnRPcmdcIjp7XCJpZFwiOjc5MixcImNvZGVcIjpcImJkOWVjZGNkX2FmMTNfNDBiMV84ODVhXzA4NTcwMDI3YWNmNVwiLFwibmFtZVwiOlwi5rOJ5bee55-z5YyWMTExMVwifSxcInJvb3RPcmdcIjp7XCJpZFwiOjc5MixcImNvZGVcIjpcImJkOWVjZGNkX2FmMTNfNDBiMV84ODVhXzA4NTcwMDI3YWNmNVwiLFwibmFtZVwiOlwi5rOJ5bee55-z5YyWMTExMVwifSxcInJvbGVzXCI6W3tcImlkXCI6MixcImNvZGVcIjpcInJvbGVfMjAyMzU4MzI1XCIsXCJuYW1lXCI6XCJJblBsYW50IENNU-a1i-ivlVwifV19IiwidXNlcl9uYW1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NVwiLFwibmFtZVwiOlwi5rOJ5bee55-z5YyWMTExMVwifSxcInJvbGVzXCI6W3tcImlkXCI6MixcImNvZGVcIjpcInJvbGVfMjAyMzU4MzI1XCIsXCJuYW1lXCI6XCJJblBsYW50IENNU-a1i-ivlVwifV19IiwidXNlcl9uYW1lIjoiYWRtaW5fMTAyNSIsIm5pY2tOYW1lIjoiYWRtaW5fMTAyNSIsInNjb3BlIjpbImFsbCJdLCJhdGkiOiIyNTgyZWZjMy0yNTBmLTRlYzYtOTczNy00ZWFiYzY3MmEzMjUiLCJpZCI6MjkyNTEsImV4cCI6MTcwNjE2MzY3MCwidHlwZSI6MSwiYXV0aG9yaXRpZXMiOlsiMl9JblBsYW50IENNU-a1i-ivlSJdLCJqdGkiOiI4ZjU5OWU4Ni1iOTMxLTRhYjYtYTNmZi1hYWQxNzZkNzhmNDQiLCJjbGllbnRfaWQiOiJhZG1pbi1hcHAifQ.kNUtNi1ns1EidnZrhqnXHGiyRgPcjh3zd0s3O1luVpGtPrPk3LrUKYtTzHyNH9tss_bdc-nwLYUOiyM9GqpYiyTdhDS3bH8aoNOs2DDQwXfn2k2Em78pQermcp62VoKdFLDp_5qaFLZ1O8k1JOeqkDYRTZHqKmR5SaLV0zpmLG46-KPCRvRSzK15xRH2-anY2rrPE9EME9pnjG3AOAZuem8E82afXH9l-c0Su-qUsmdwv6tyWdJhsOgOzpSla1utjgiyiE07LLMahoaGRUTTM-M_KM1GCR-Jpak90JxEeXNPTpOBIs7ncWhAf6Jf0cTDBWN4chl-mXWRp71bSkHMaA",
        tokenHead: "Bearer ",
        trustTokenHead: "Trust ",
        tokenHeader: "Authorization",
        expiresIn: 7199,
        orgCode: "bd9ecdcd_af13_40b1_885a_08570027acf5",
      },
      success: true,
      isSuccess: true,
      msg: "请求成功",
    });
  });
};

/**
 * 小程序登录
 */
export const ApiWxUserLogin = (data) => {
  // return request({
  //   url: "/post/wx/login",
  //   method: "POST",
  //   data,
  // });
  return new Promise((resolve, reject) => {
    resolve({
      code: "00000",
      content: {
        exipreTime: "2025/11/20",
        token: "jfksldfjklsdfjlsdf",
      },
      success: true,
      isSuccess: true,
      msg: "请求成功",
    });
  });
};
